Skip to content

feat(async): Set priorities to async tasks#14195

Closed
kiblik wants to merge 10000 commits intoDefectDojo:devfrom
kiblik:celery_set_prio
Closed

feat(async): Set priorities to async tasks#14195
kiblik wants to merge 10000 commits intoDefectDojo:devfrom
kiblik:celery_set_prio

Conversation

@kiblik
Copy link
Copy Markdown
Contributor

@kiblik kiblik commented Jan 28, 2026

This PR is adding support for priority queues. More important tasks will be processed sooner and vice versa.

The status of each queue is listed in the system settings overview:
image

Queue with id 0 is automatically marked without a suffix (all other are using naming convention celery:1, celery:2...). Thanks to this fact, we are keeping backward compatibility (if there are any tasks in the queue during migration to the new version, we will still process those tasks after the upgrade).

It is a bit harder to write tests for this. But I tested manually (stop worker, play around, start worker, observe logs) and it was working as expected.

The role of each queue is described in settings.dist.py (and reflected in the overview in system settings). If task do not have a priority assigned, priority is set to the default value: 3

I'm open to feedback if priority of any task should be changed.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-detected settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.